//https://leetcode.cn/problems/que-shi-de-shu-zi-lcof/submissions/558012445/
class Solution {
    public int takeAttendance(int[] records) {
        for (int i = 0; i < records.length; i++) {
                if (records[i] != i) {
                    return i;
                }
        }
        return records.length;
    }
}